[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
##############################################################################
###+-------------+############################################################
#+-| DISKSPACE() |--------------------------------------------------------+###
#| +-------------+ Returns the number of bytes left on the specified drive|###
#+------------------------------------------------------------------------+###
##############################################################################
##############################################################################
#+--| Summary |----------------+##############################################
#|     #INCLUDE system.hdr     |##############################################
#+-----------------------------+##############################################
##############################################################################
##############################################################################
#+--| Syntax |--------------------------------+###############################
#|     FUNCTION ULONG diskspace PROTOTYPE     |###############################
#|      PARAMETERS VALUE UINT drive_id        |###############################
#+--------------------------------------------+###############################
##############################################################################
##############################################################################
######+---| Description |----------------------------------------------+######
######| The diskspace() function returns the number of bytes remaining |######
######| on the drive specified by drive_id.  drive_id is based on a    |######
######| numbering system where drive A is id 0, drive B is id 1, etc.  |######
######+----------------------------------------------------------------+######
##############################################################################
##############################################################################
#########+--| Example 1 |-------------------------------------------+#########
#########| *    Make sure the backup disk has enough room           |#########
#########| *    for a file.                                         |#########
#########|                                                          |#########
#########| IF filesize ( "tmp.dbf" ) > diskspace( 0 )               |#########
#########|     ? "Error...unable to backup to drive A:"             |#########
#########| ENDIF                                                    |#########
#########+----------------------------------------------------------+#########
##############################################################################
##############################################################################
#########+--| Example 2 |-------------------------------------------+#########
#########| *    Get the diskspace of the current drive.             |#########
#########|                                                          |#########
#########| ? diskspace( curdrive() )                                |#########
#########+----------------------------------------------------------+#########
##############################################################################

See Also: curdir() curdrive() exist() filesize()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson